from Stan import *

class Cadena:
  def __init__(self, v):
    self.v= v

  def talla(self):
    return len(self.v)+1

  def fijaDireccion(self, dir):
    self.dir= dir

  def inicializacion(self, c):
    d= self.dir
    for l in self.v:
      c.append(Asignacion(MD(d), Cte(ord(l)), repr(l)))
      d+= 1
    c.append(Asignacion(MD(d), Cte(0), "Fin de la cadena"))

  def __str__(self):
    return repr(self.v)

